<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UFT-8">
<title>Cadastro Calendário de Vacinação</title>
</head>
<body>
	<c:import url="cabecalho.jsp"/>
	<div id="formulario_cadastro">
		<form action="vacinas" method="post">
			<c:if test="${vacina == null}">
				<div id="inserir">
					<fieldset>
						<legend>Cadastrar</legend>
						<label>Vacina: <input type="Text" name="nome" /></label> 
						<label>Idade:<input type="text" name="idade" />(meses)</label> 
						<input type="submit" name="action" value="Salvar" /> 
						<input type="reset" value="Limpar" />
					</fieldset>
				</div>
			</c:if>
			<c:if test="${vacina != null}">
				<div id="inserir">
					<fieldset>
						<legend>Cadastrar</legend>
						<input type="hidden" name="action" value="salvar"/>
						<input type="hidden" name="codigo" value="${vacina.codigo}"/>
						<label>Vacina: <input type="Text" name="nome" value="${vacina.nome}"/></label> 
						<label>Idade: <input type="text" name="idade" value="${vacina.idadeVacinacao }"/>(meses)</label> 
						<input type="submit" value="Salvar" /> 
						<input type="reset" value="Limpar" />
					</fieldset>
				</div>
			</c:if>
		</form>
	</div>
</body>
</html>